<%--
  Created by IntelliJ IDEA.
  User: haol
  Date: 2016/9/23
  Time: 21:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%@ include file="/common/meta.jsp" %>
    <script type="text/javascript" src="${ctx}/js/gcu/room/list.js"></script>
</head>
<body class="body_owner_list">
<ul class="breadcrumb">
    <li class="icon"></li>
    <li>您所在的位置：</li>
    <li>系统设置</li>
    <li>门户列表</li>
</ul>
<%@ include file="/common/top.jsp" %>
<div class="widget widget-table">
    <div class="widget-content" id="formDiv">
        <form>
            <table class="table table-bordered">
                <tr>
                    <th>楼宇</th>
                    <td class="pn-fcontent">
                        <select name="buildName" class="form-control">
                            <option value="">全部</option>
                            <c:forEach var="builds" items="${build_list}">
                                <option value="${builds.buildName}">${builds.buildName}</option>
                            </c:forEach>
                        </select>
                    </td>
                    <th>是否入住</th>
                    <td class="pn-fcontent">
                        <select name="isIn" class="form-control">
                            <option value="">全部</option>
                            <option value="1">已住</option>
                            <option value="0">未住</option>
                        </select>
                    </td>
                    <th>业主姓名</th>
                    <td class="pn-fcontent">
                        <input type="text" name="ownerName" class="form-control"
                               style="width:200px">
                    </td>
                </tr>
            </table>
            <div class="widget-bottom">
                <button type="submit" class="btn btn-info pull-right" id="searchBtn">搜索</button>
                <button type="button" class="btn btn-s-md pull-right" id="clearBtn">清空</button>
                <button type="button" class="btn btn-s-md pull-right" id="addBtn">新增</button>
                <button type="button" class="btn btn-danger pull-right" id="delBtn">删除</button>
                <input type="hidden" id="buildId" value="${buildId}">
            </div>
            </form>
    </div>
</div>
<div class="separator line"></div>
<div class="widget widget-table">
    <div class="widget-content widget-list">
        <form id="myForm">
        <table class="table table-striped table-bordered">
            <div class="panel-heading"><span class="badge">房屋信息列表</span></div>
            <tr>
                <th><input type="checkbox" id="checkbox4all" onclick="selectAll($(this));">序号</th>
                <th>楼宇</th>
                <th>房号</th>
                <th>面积(㎡)</th>
                <th>是否入住</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>
            <c:if test="${empty roomList}">
                <tr class='text-danger'>
                    <td colspan='10' align='center'>无数据存在！</td>
                </tr>
            </c:if>
            <c:forEach var="rooms" items="${roomList}" varStatus="status">
                <tr>
                    <td><input type="checkbox" name="subBox" value="${rooms.id}"/>${status.count}</td>
                    <td>${rooms.buildName}</td>
                    <td>${rooms.roomNum}</td>
                    <td>${rooms.area}</td>
                    <td>
                        <c:if test="${rooms.isIn eq 0}">未入住</c:if>
                        <c:if test="${rooms.isIn eq 1}">已入住</c:if>
                    </td>
                    <td>${rooms.createTime}</td>
                    <td>
                        <a href="${ctx}/room/edit/${rooms.id}">
                            <span style="font-size: 5px" class="label label-primary">详情</span></a>
                        <%--<a href="${ctx}/room/del/${rooms.id}">
                            <span style="font-size: 5px" class="label label-danger">删除</span></a>--%>
                    </td>
                </tr>
            </c:forEach>
        </table>
            <div class="widget-bottom">
                <jsp:include page="/common/pager.jsp">
                    <jsp:param value="users" name="url"/>
                    <jsp:param value="${pagers.total}" name="items"/>
                </jsp:include>
            </div>
        </form>
        <div class="widget-bottom">
        </div>
    </div>
</div>
</div>
</body>
</html>